vue3解决:[vite] Internal server error: Preprocessor dependency “sass“ not found. Did you install it?

您所在的位置:网站首页 vue3报错is not a function vue3解决:[vite] Internal server error: Preprocessor dependency “sass“ not found. Did you install it?

vue3解决:[vite] Internal server error: Preprocessor dependency “sass“ not found. Did you install it?

2023-06-26 22:19| 来源: 网络整理| 查看: 265

1、问题描述:

其一、报错为:

Preprocessor dependency "sass" not found. Did you install it? [vite] Internal server error: Preprocessor dependency "sass" not found. Did you install it?

中文为:

未找到预处理器依赖项“sass”。 你安装了吗? [vite] 内部服务器错误:未找到预处理器依赖项“sass”。 你安装了吗?

其二、报错面显示为:

在这里插入图片描述

2、问题分析:

根据报错的代码提示,原因为:没有安装 sass 依赖,安装应该就能解决问题;

3、问题解决:

其一、安装 sass 依赖命令:

npm install --save-dev sass

在这里插入图片描述

其二、重启项目(即:项目命令,一般命令如下):

npm run serve

在这里插入图片描述 此时的问题,一般就能解决;

其三、如果还是报错:

可以考虑用命令 npm i 重装一下 node_modules ,然后再执行项目 npm run serve

此时的问题,一般就能解决;

4、小结:

其一、哪里有不对或不合适的地方,还请大佬们多多指点和交流! 其二、有兴趣的话,可以多多关注这个专栏(Vue(Vue2+Vue3)面试必备专栏):https://blog.csdn.net/weixin_43405300/category_11525646.html?spm=1001.2014.3001.5482



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3